<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <title>美策平台</title>
    <link rel="icon" type="image/png" href="/img/icon.png">
    <link rel="stylesheet" type="text/css" href="../../datepicker/jquery-ui.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/app.css">
    <link rel="stylesheet" type="text/css" href="../../css/myorder.css">
    <script type="text/javascript" src="../../js/jquery.min.js"></script>
    <script type="text/javascript" src="/h5/js/all.js"></script>
</head>
<body>
<!--
    制作者：九哥
    页面：发布的招聘
    时间：2019-03-25
    更新：
-->





<!----------发布的招聘页面---------->
<div id="myorderPage">
    <div id="myorderTitle">
        <b>发布的招聘</b>
        <img src="../../images/return.png" id="myorderRtn">
    </div>
    <div style="height:40px"></div>
    <section class="aui-scrollView" id="joblist">
        <p style="text-align:center;line-height:100px;">努力加载中...</p>
    </section>
</div>
<!----------发布的招聘页面---------->





<!----------错误提示---------->
<div id="errMsg"></div>
<!----------错误提示---------->
</body>
<script type="text/javascript" src="../../js/app.js"></script>
<script type="text/javascript" src="../../js/mysetPageChange.js"></script>
<script type="text/javascript" src="../../js/myset2.js"></script>
<script>
    (function(){
        getPubJobList(); //获取招聘信息
    })();
    function getPubJobList() {
        var userInfo = cacheGet('userInfo'); //获取用户信息
        if (userInfo == null || userInfo.token == 'undefined') {
            window.location.href = '/h5/login/login.html';
        }
        var data = {
            app_access: app_access,
            token: userInfo.token,
            type: userInfo.type,
            cate: userInfo.cate
        };
        $.ajax({
            type: 'post',
            url: getDomain() + 'pub/job-get',
            data: data,
            success: function (res) {
                //console.log(res); return;
                if (res.code != 0) {
                    $('#joblist').html('<div class="load">没有记录</div>');
                    console.log(res); return;
                }
                var data = res.data;
                var i, h = '';
                for (i=0;i<data.length;i++) {
                    h += '<div class="tab-panel-item tab-active">';
                    h +=    '<a href="" class="aui-flex">';
                    h +=        '<div class="aui-look-img">';
                    if (data[i].thumb) {
                        h += '<img src="'+data[i].thumb+'" width="60">';
                    } else {
                        h += '<span></span>';
                    }
                    h +=        '</div>';
                    h +=        '<div class="aui-flex-box">';
                    h +=            '<h3>'+data[i].jobName+'</h3>';
                    h +=            '<p>需要'+data[i].num+'名，要求...</p>';
                    h +=        '</div>';
                    h +=        '<div class="orderNotice">新发布</div>';
                    h +=    '</a>';
                    h += '</div>';
                    h += '<hr>';
                }
                $('#joblist').html(h);
            },
            error: function () {
                console.log('操作失败！'); return;
            }
        });
    }
</script>
</html>